<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Combine Input</title>
    <script type="text/javascript" src="../bower_components/jquery/dist/jquery.min.js"></script>
    <style>
        .combine_input {
            display: block;
            width: 380px;
            border: 1px solid #cccccc;
            box-shadow: 0 2px 2px #ddd;
            border-radius: 5px;
            position: relative;
        }

        .combine_input.focus{
            border-color: #ff7800;
        }

        .combine_input>.combine_title{
            width: 100%;
            height: 40px;
            border-bottom: 1px solid #f3e1d2;
        }

        .combine_input>.combine_content{
            width: 100%;
            height: 100px;
        }

        .combine_input>.combine_title div,
        .combine_input>.combine_content div{
            height: 100%;
            vertical-align: middle;
            float: left;
        }

        .combine_input .combine-flag{
            width: 20px;
            background: url(../public/icon-star.png) center 10px no-repeat;
        }

        .combine_input .combine-label{
            width: 100px;
        }

        .combine_input .combine-label label{
            line-height: 40px;
        }

        .combine_input .combine-text{
            width: 260px;
            position: relative;
        }

        .combine_input .combine-text .error{
            position: absolute;
            top: 0;
            left: 0;
            color: #f00;
            left: 100%;
            width: 300px;
            line-height: 40px;
            padding-left: 10px;
        }

        .combine_input .combine-text input[type='text'],
        .combine_input .combine-text textarea{
            border: none;
            width: 100%;
            height: 100%;
            padding: 0;
        }

        .combine_input .combine-text textarea:focus,
        .combine_input .combine-text textarea:active,
        .combine_input .combine-text input[type='text']:focus,
        .combine_input .combine-text input[type='text']:active {
            outline: none;
        }
    </style>

    <script type="text/javascript">
        $(function(){
            $(".combine_input input[type='text'],.combine_input textarea").focus(function(){
                $(this).closest(".combine_input").addClass("focus");
            }).blur(function(){
                $(this).closest(".combine_input").removeClass("focus");
            });
        });
    </script>
</head>
<body>
    <div class="combine_input">
        <div class="combine_title">
            <div class="combine-flag"></div>
            <div class="combine-label">
                <label>Title</label>
            </div>
            <div class="combine-text">
                <input type="text" id="txt-Title" name="Title" maxlength="100"/>
                <span class="error">enquiry content should not be empty!</span>
            </div>
        </div>
        <div class="combine_content">
            <div class="combine-flag"></div>
            <div class="combine-label">
                <label>Content</label>
            </div>
            <div class="combine-text">
                <textarea id="txt-Content" name="Content" style="resize: none;"></textarea>
                <span class="error">enquiry content should not be empty!</span>
            </div>
        </div>
    </div>
</body>
</html>